<?php

namespace App\Models;

use App\Models\Traits\Btn;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as AuthUser;
class User extends AuthUser
{
    use HasFactory;
    use SoftDeletes;
    use Btn;
    protected $guarded =[];  //如果不添加  黑名单或白名单  会报错


    public function role()
    {
        return $this->hasOne(Role::class,'id','role_id');
    }

}
